Title: SQL W3S (By-BKK) / 105 Drop Table
Tags: Obsidian_to_Anki

Q: What does the DROP TABLE statement do in SQL?
A: It deletes a table and all its data from the database

Q: True or False: DROP TABLE only deletes the data inside a table but keeps the table structure
A: False

Q: What is the syntax to drop a table in SQL?
A: DROP TABLE table_name;

Q: Give an example of the SQL command to drop the table "Shippers"
A: DROP TABLE Shippers;

Q: What caution should you take before using DROP TABLE?
A: Dropping a table will result in loss of all information stored in the table

Q: True or False: SQL DROP TABLE permanently removes the table from the database
A: True

Q: What is the difference between DROP TABLE and TRUNCATE TABLE?
A: DROP TABLE deletes the table and its data, TRUNCATE TABLE deletes only the data, keeping the table

Q: What does TRUNCATE TABLE do?
A: Deletes all data inside a table but keeps the table structure

Q: Give the syntax for TRUNCATE TABLE
A: TRUNCATE TABLE table_name;

Q: TRUNCATE TABLE deletes all rows in a table but keeps the table itself. What is the statement?
A: TRUNCATE TABLE

Q: DROP TABLE deletes the table and its data. What is the statement?
A: DROP TABLE

Q: What warning is associated with DROP TABLE?
A: Answer: Be careful, deleting a table causes loss of all the information stored in it

Q: What does DROP TABLE do in SQL?
A: Answer: DROP TABLE deletes the table and all its data from the database